<?php

namespace App\Model\Device;

class Group extends \App\Model\BaseModel
{

	public $tableName = "sc_device_group";

	public function getGroupData($condition = [], $columns = '*')
    {
		$this->db->where("mark", 1);

		if (!empty($condition['id'])) {
			$this->db->where("id", $condition['id']);
		}

		$this->db->orderBy("id", "desc");
		$data = $this->db->get($this->tableName, null, $columns);
		return $data;
	}

}